package com.yc.jpyy.base.redis;

import com.yc.jpyy.base.ketama.Node;
import com.yc.jpyy.base.util.SpringWebContextUtil;
import com.yc.jpyy.base.util.SysConfig;

public class RedisManager {
	public static IRedisManager getCacheManagerImpl(Object code){
		if (null == code){
			code = new String("jedisTemplate");
		}
		Node cacheNode = SysConfig.getCacheNode(code);
		return (IRedisManager)SpringWebContextUtil.getApplicationContext().getBean(cacheNode.getValue());
	}
}
